<?php $this->_extends('_layouts/share_layout')?>

<?php $this->_block('title'); ?>
Share With Twitter Followers - MommyMoolah
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="MommyMoolah: Share With Twitter Followers." />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
	<div style="width: 600px; text-align:center;">
		<div class="title">Share With Twitter Followers!</div>
		<form action="<?php echo url('user/step3'); ?>" method="post">
			<div style="width: 395px; margin:auto;">
				<div class="tr">
					<p id="message" class="sharetext">
						share with your friends on twitter! You will be rewarded one free token for each friend you invited and joined our game.</p>
				</div>
				<div class="tr" style="text-align:center;display:none" id="tw-button">
					<!-- twitter button -->
					<iframe class="twitter-share-button twitter-count-none" scrolling="no" frameborder="0" allowtransparency="true" src="http://platform.twitter.com/widgets/tweet_button.html#_=1318470728243&count=none&id=twitter_tweet_button_0&lang=en&original_referer=http%3A%2F%2Fwww.<?php echo $site['domain']?>%2Fuser%2Fstep3&text=Hey%2C%20check%20out%20this%20new%20game%2C%20they're%20giving%20away%20real%20Cash!%20Click%20http%3A%2F%2Fwww.<?php echo $site['domain'];?>%3Fcam%3Dref%26pub%3Dtw%26pla%3D<?php echo $user['id'];?>%20to%20join%20us!%20%40TeamCBG&url=none%3B" style="width: 55px; height: 20px;" title="Twitter For Websites: Tweet Button">
					</iframe>
					
					<!-- twitter follow button
					<a href="https://twitter.com/TeamCBG" class="twitter-follow-button" data-show-count="false">Follow @TeamCBG</a>
					<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script> -->
				</div>
				<div class="tr" id="tw-login-row">
				   	 <span id="tw-login"></span>
						<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
					    <script type="text/javascript">
					    
						      $(function(){
						
						    	  twttr.anywhere(function (T) {
						
						    	        T("#tw-login").connectButton({authComplete: function(user) {
						    				
						    	            $("#tw-login").data('screenName' ,user.screenName);
						    	            $('#tw-button').show();
						    		
						    	          },});
						    	        if(T.isConnected()){
						    		    	 $('#tw-button').show();
						    		     }
						
						    	      });
							     
						      });
					
						      twttr.events.bind('tweet', function(event) {
						    	  $.post("<?php echo url('user/followers');?>",{screenName : $("#tw-login").data('screenName')}, function(){});
						      });
					
				    	</script>
			</div>
				<div class="tr">
					<!--<a class="btn-3" style="margin:auto;" href="<?php echo url('user/step4'); ?>">Next</a>-->
					<a id="winclose" style="margin:auto;" class="btn-3">Close</a>
					<script>
						$('#winclose').click(function(){
							window.top.opener = null;
							window.close();
						});
					</script>
				</div>
			</div>
		</form>
	</div>
<?php $this->_endblock(); ?>